package cc.rengu.oltp.service.common.dao;

/**
 * 数据库Sequence操作接口
 * Created by 王成 on 2017/11/23.
 */
public interface SequenceMapper {

    /**
     * 获取交易流水号Sequence
     *
     * @return Sequence字符串
     */
    String getNextTransSequenceNo(int length) throws Exception;

    /**
     * 获取短信验证码申请流水号Sequence
     *
     * @param length 序列长度
     * @return Sequence字符串
     * @throws Exception 异常
     */
    String getNextSmsVerifySeqNo(int length) throws Exception;

    /**
     * 获取指定sequence的序列号
     *
     * @param seqName sequence名称
     * @param length  sequence长度
     * @return sequence字符串
     * @throws Exception 异常
     */
    String getNextSeqNoBySeqName(String seqName, int length) throws Exception;
}
